#include<bits/stdc++.h>
using namespace std;
const int N=100010;
int n,a[N]={0},hp[N]={0},pd[N]={0},maxn=-1,minn=N;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        maxn=max(a[i],maxn);
        minn=min(a[i],minn);
    }
    sort(a+1,a+1+n);
    for(int i=1;i<=n;i++){
        hp[a[i]]++;
        if(hp[a[i]]==1){
            pd[a[i]]=a[i-1];
        }
    }
    for(int l=minn;l<=maxn;l++){
        if(hp[l]==0||pd[l]==0)continue;
        int imp=hp[l];
        while(1){
            if(imp>hp[pd[l]]){
                n-=hp[pd[l]];
                imp-=hp[pd[l]];
                hp[pd[l]]=0;
                while(hp[pd[l]]==0&&pd[l]!=0)pd[l]=pd[pd[l]];
                if(pd[l]==0)break;
            }
            else {
                hp[pd[l]]-=imp;
                n-=imp;
                break;
            }
        }
    }
    cout<<n;
    return 0;
}
